<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width,height=device-height initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
</head>
<body>
<div class="well-white">
    <div class="page-header" style="margin-bottom:10px;">
        <h4>{%$app.app_name%}</h4>
    </div>
    <style>
        .table-bordered td,.table-bordered th{
            text-align: center;
        }
    </style>
    <div class="page-body">
        <div class="body-main">
            {%if $info%}
                <table class="table table-bordered table-striped">
                    <tr>
                        <th>店铺名称</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>

                    <tbody>
                    {%foreach from=$info item=i%}
                    <tr>
                        <td>
                            {%$i.advice_content%}
                        </td>
                        <td>
                           {%$i.createtime%}
                        </td>
                        <td>
                            <button class="confirm-delete btn btn-small btn-danger" onclick="MakeRevise('{%$i.advice_id%}')">修改</button>
                            <button class="confirm-delete btn btn-small btn-danger" onclick="MakeSure('{%$i.advice_id%}')">删除</button>
                        </td>
                    </tr>
                    {%/foreach%}
                    </tbody>
                </table>
            {%include file='html_blocks/widget/pager.html'%}
            {%else%}
            <p class="alert alert-error">
                (⊙o⊙)…，暂无意见反馈数据，请耐心等待!
            </p>
            {%/if%}
            <!-- 确认删除模态框Modal -->
            <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h3 id="myModalLabel"></h3>
                </div>
                <div class="modal-body">
                    <p>您确定要删除此条意见反馈记录吗？</p>
                </div>
                <div class="modal-footer" id="test">
                    <button id="cancelButton" class="btn" data-dismiss="modal" aria-hidden="true">取消，不删了</button>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function MakeSure(storeId){
        var del = '<a class="btn btn-primary" aria-hidden="true" href="{%appurl controller=Default action=delete%}&advice_id='+storeId+'">是的,删除</a>';
        document.getElementById('test').innerHTML = '<button id="cancelButton" class="btn" data-dismiss="modal" aria-hidden="true">取消，不删了</button>'+del;
        $('#myModal').modal('show');
    }
    function MakeRevise(storeId){
    }
</script>